const db = require('../config/db')
const {DataTypes} = require('sequelize');

const attributes = {
    id: {
        type: DataTypes.INTEGER,
        primaryKey: true,            // 主键
        autoIncrement: true,         // 自动递增
    },
    blog_type_name: {
        type: DataTypes.STRING(20),
        comment: '博客类型名称',
        allowNull: false,
        unicode: true
    },
    blog_type_remark: {
        type: DataTypes.STRING,
        comment: '备注',
        allowNull: true
    },


}


const blogType = db.define('blog_type', attributes)

// blogType.sync()

module.exports = blogType
